/*
 * Copyright (C) 2016 yixun All Rights Reserved.
 * 
 * SellControlDto.java
 */
package com.emm.yixun.common.model.dto;

import java.math.BigDecimal;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;

import com.emm.yixun.common.model.SellControl;

/**
 * [文件名称]<br>
 * SellControlDto.java<br>
 * <br>
 * [文件描述]<br>
 * 销控表 数据辅助类<br>
 * <br>
 * [修改记录]<br>
 * 2016-06-20 15:08:27 创建 陶俊代码生成器<br>
 * 
 * @author 陶俊代码生成器
 * @version 1.00
 */
public class SellControlDto extends SellControl {
	private static final long serialVersionUID = 1L;
	/**
	 * 需要正序字段名
	 */
	private List<String> asc;
	/**
	 * 需要逆序字段名
	 */
	private List<String> desc;
	/**
	 * 排序SQL
	 */
	private String orders;

	private String m_businessStatus;
	private BigDecimal totalPrice;

	private String roomStatus;
	private String houseTypeName;
	private String userName;
	private String combinedName;
	private String roomIds;
	
	//房产信息
	//项目
	private String projectId;
	//组团
	private String premisesId;
	//楼栋
	private String buildingId;
	//单元
	private String unitId;
	private String isExport; //是否导入
	
	
	/**
	 * isExport.
	 *
	 * @return  the isExport
	 * @since   JDK 1.6
	 */
	public String getIsExport() {
		return isExport;
	}

	/**
	 * isExport.
	 *
	 * @param   isExport    the isExport to set
	 * @since   JDK 1.6
	 */
	public void setIsExport(String isExport) {
		this.isExport = isExport;
	}

	/**
	 * 添加需要正序字段名
	 */
	public void addAsc(String col) {
		if (asc == null) {
			asc = new LinkedList<String>();
		}
		asc.add(col);
	}

	/**
	 * 清空需要正序字段名
	 */
	public void cleanAsc() {
		asc = null;
	}

	/**
	 * 添加需要逆序字段名
	 */
	public void addDesc(String col) {
		if (desc == null) {
			desc = new LinkedList<String>();
		}
		desc.add(col);
	}

	/**
	 * 清空需要逆序字段名
	 */
	public void cleanDesc() {
		desc = null;
	}

	/**
	 * 如果排序SQL为空根据需要正逆序的字段名拼接排序SQL
	 */
	public String getOrders() {
		StringBuilder orderStr = null;
		StringBuilder ascStr;
		StringBuilder descStr;
		if (orders == null) {
			if (asc != null) {
				ascStr = new StringBuilder();
				orderStr = new StringBuilder();
				String pex = "";
				for (String a : asc) {
					ascStr.append(pex + a);
					pex = ",";
				}
				orderStr.append(ascStr.toString() + " ASC");
			}
			if (desc != null) {
				descStr = new StringBuilder();
				String pex = "";
				for (String d : desc) {
					descStr.append(pex + d);
					pex = ",";
				}
				if (orderStr == null) {
					orderStr = new StringBuilder();
					orderStr.append(descStr.toString() + " DESC");
				} else {
					orderStr.append("," + descStr.toString() + " DESC");
				}
			}
			orders = orderStr != null ? orderStr.toString() : null;
		}

		return orders;
	}

	/**
	 * 设置排序SQL
	 */
	public void setOrders(String orders) {
		this.orders = orders;
	}

	private String endValidityBefore;
	private String endValidityAfter;
	private Date updateTimeBefore;
	private Date updateTimeAfter;
	private String startValidityBefore;
	private String startValidityAfter;
	private Date createTimeBefore;
	private Date createTimeAfter;
	private String controlDateBefore;
	private String controlDateAfter;

	public String getEndValidityBefore() {
		return this.endValidityBefore;
	}

	public void setEndValidityBefore(String endValidityBefore) {
		this.endValidityBefore = endValidityBefore;
	}

	public String getEndValidityAfter() {
		return this.endValidityAfter;
	}

	public void setEndValidityAfter(String endValidityAfter) {
		this.endValidityAfter = endValidityAfter;
	}

	public Date getUpdateTimeBefore() {
		return this.updateTimeBefore;
	}

	public void setUpdateTimeBefore(Date updateTimeBefore) {
		this.updateTimeBefore = updateTimeBefore;
	}

	public Date getUpdateTimeAfter() {
		return this.updateTimeAfter;
	}

	public void setUpdateTimeAfter(Date updateTimeAfter) {
		this.updateTimeAfter = updateTimeAfter;
	}

	public String getStartValidityBefore() {
		return this.startValidityBefore;
	}

	public void setStartValidityBefore(String startValidityBefore) {
		this.startValidityBefore = startValidityBefore;
	}

	public String getStartValidityAfter() {
		return this.startValidityAfter;
	}

	public void setStartValidityAfter(String startValidityAfter) {
		this.startValidityAfter = startValidityAfter;
	}

	public Date getCreateTimeBefore() {
		return this.createTimeBefore;
	}

	public void setCreateTimeBefore(Date createTimeBefore) {
		this.createTimeBefore = createTimeBefore;
	}

	public Date getCreateTimeAfter() {
		return this.createTimeAfter;
	}

	public void setCreateTimeAfter(Date createTimeAfter) {
		this.createTimeAfter = createTimeAfter;
	}

	public String getControlDateBefore() {
		return this.controlDateBefore;
	}

	public void setControlDateBefore(String controlDateBefore) {
		this.controlDateBefore = controlDateBefore;
	}

	public String getControlDateAfter() {
		return this.controlDateAfter;
	}

	public void setControlDateAfter(String controlDateAfter) {
		this.controlDateAfter = controlDateAfter;
	}

	public String getM_businessStatus() {
		return m_businessStatus;
	}

	public void setM_businessStatus(String m_businessStatus) {
		this.m_businessStatus = m_businessStatus;
	}

	public BigDecimal getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(BigDecimal totalPrice) {
		this.totalPrice = totalPrice;
	}

	public String getRoomStatus() {
		return roomStatus;
	}

	public void setRoomStatus(String roomStatus) {
		this.roomStatus = roomStatus;
	}

	public String getHouseTypeName() {
		return houseTypeName;
	}

	public void setHouseTypeName(String houseTypeName) {
		this.houseTypeName = houseTypeName;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getCombinedName() {
		return combinedName;
	}

	public void setCombinedName(String combinedName) {
		this.combinedName = combinedName;
	}

	public String getRoomIds() {
		return roomIds;
	}

	public void setRoomIds(String roomIds) {
		this.roomIds = roomIds;
	}

	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	public String getPremisesId() {
		return premisesId;
	}

	public void setPremisesId(String premisesId) {
		this.premisesId = premisesId;
	}

	public String getBuildingId() {
		return buildingId;
	}

	public void setBuildingId(String buildingId) {
		this.buildingId = buildingId;
	}

	public String getUnitId() {
		return unitId;
	}

	public void setUnitId(String unitId) {
		this.unitId = unitId;
	}

}
